package com.firebroo.Template;

public class test {
	public static void main(String[] args) {
		String exp = "8+8";
		int result;
		if(exp.indexOf("*") != -1){
			AbstractCalculator cal = new Multiple();
			result = cal.calculate(exp, "\\*");
		}else if(exp.indexOf("-") != -1){
			AbstractCalculator cal = new Minus();
			result = cal.calculate(exp, "\\-");
		}else{
			AbstractCalculator cal = new Plus();
			result = cal.calculate(exp, "\\+");
		}
		System.out.println(result);
	}

}
